package com.elt.util;

import java.util.List;
import java.util.Map;

import android.graphics.Bitmap;

public class CheckUtil {
	public static boolean isNotNull(Object str) {
		return str != null;
	}

	public static boolean isNotNullString(String str) {
		return (str != null && !"".equals(str));
	}

	public static boolean isEqualString(String one, String anther) {
		return (one != null && anther != null && one.equals(anther));
	}

	/**
	 * 
	 * @param bitmap
	 * @return
	 */
	public static final boolean isNotNullBitmap(Bitmap bitmap) {
		return (bitmap != null && !bitmap.isRecycled());
	}

	public static final boolean isNotNullList(List list) {
		return (list != null && list.size() != 0);
	}

	public static final boolean isNotNullBytes(byte[] bytes) {
		return (bytes != null && bytes.length != 0);
	}

	public static final boolean isNotNullMap(Map map) {
		return (map != null && map.size() != 0);
	}

}
